package com.yehongyu.mytools.basic.grammar;

public class Java001_AllJavaIsObject {

	public static void main(String[] args) throws Exception {
		Integer[] testArray = new Integer[100];
		/*
		 * 已知有两个Java对象testArray，someArray，其中testArray定义如上
		 * 当someArray是何类型时，testArray可以隐式的转换为someArray 即语句someArray =
		 * testArray;在编译及运行期都不会发生异常 (1)、当someArray为数组对象时 (2)、当someArray为接口时
		 * (3)、当someArray为非数组对象时
		 */
		Object[] someArray = testArray;
		System.out.println(someArray);
		Cloneable someArrayII = testArray;
		System.out.println(someArrayII);
		Object someArrayIII = testArray;
		System.out.println(someArrayIII);
		String[][] sampleArray = new String[2][];
		sampleArray[0] = new String[3];
		sampleArray[1] = new String[4];
		System.out.println((Object[]) sampleArray);
		System.out.println((Cloneable) sampleArray);
		System.out.println((Object) sampleArray);

	}
}
